diff options
Diffstat (limited to 'app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/pre-quote/page.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/pre-quote/page.tsx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/pre-quote/page.tsx b/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/pre-quote/page.tsx deleted file mode 100644 index d978974b..00000000 --- a/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/pre-quote/page.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Suspense } from 'react' -import { notFound } from 'next/navigation' -import { getBiddingDetailData } from '@/lib/bidding/detail/service' -import { getBiddingCompanies } from '@/lib/bidding/pre-quote/service' -import { BiddingPreQuoteContent } from '@/lib/bidding/pre-quote/table/bidding-pre-quote-content' - -// 메타데이터 생성 -export async function generateMetadata({ params }: { params: Promise<{ id: string }> }) { - const { id } = await params - const parsedId = parseInt(id) - if (isNaN(parsedId)) return { title: '입찰 사전견적' } - - try { - const detailData = await getBiddingDetailData(parsedId) - return { - title: detailData.bidding ? `${detailData.bidding.title} - 입찰 사전견적` : '입찰 사전견적', - } - } catch { - return { title: '입찰 사전견적' } - } -} - -interface PageProps { - params: Promise<{ id: string }> -} - -export default async function Page({ params }: PageProps) { - const { id } = await params - const parsedId = parseInt(id) - - if (isNaN(parsedId)) { - notFound() - } - - // 통합 데이터 로딩 함수 사용 - const detailData = await getBiddingDetailData(parsedId) - - if (!detailData.bidding) { - notFound() - } - - // 사전견적용 입찰 업체들 조회 - const biddingCompaniesResult = await getBiddingCompanies(parsedId) - const biddingCompanies = biddingCompaniesResult?.success ? biddingCompaniesResult.data || [] : [] - - return ( - <Suspense fallback={<div className="p-8">로딩 중...</div>}> - <BiddingPreQuoteContent - bidding={detailData.bidding} - quotationDetails={detailData.quotationDetails} - biddingCompanies={biddingCompanies} - prItems={detailData.prItems} - /> - </Suspense> - ) -} |
